package cn.gok.demo.service;

import cn.gok.demo.base.service.BaseService;
import cn.gok.demo.dao.PeopleMapper;
import cn.gok.demo.entity.People;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @ClassName PeopleService
 * @Description TODO
 * @Author HP
 * @Date 15:33 2022/7/26
 * @Version 1.0
 **/
@Service
public class PeopleService extends BaseService<People, PeopleMapper> {
    @Autowired
    PeopleMapper mapper;

    @Override
    public int save(People people){
        people.setCreateTime(new Date());
        people.setUpdateTime(new Date());
        return mapper.save(people);
    }
}
